package com.chb.utils;

import java.io.Closeable;
import java.io.IOException;

/**
 * @description:
 * @author: CHB
 * @create: 2022-03-14 10:18
 **/
public class IoUtils {

    /**
     * 关闭io
     * @param closeables
     */
    public static void close(Closeable... closeables) {
        for (Closeable closeable : closeables) {
            if (closeable != null) {
                try {
                    closeable.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
